package org.example.back.mapper.advice;

import java.time.LocalDate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserSportAdviceMapper {

    String findAdvice(@Param("userId") Integer userId,
                      @Param("adviceType") String adviceType,
                      @Param("adviceDate") LocalDate adviceDate);

    void insertAdvice(@Param("userId") Integer userId,
                      @Param("adviceType") String adviceType,
                      @Param("adviceDate") LocalDate adviceDate,
                      @Param("advice") String advice);

    void deleteAdviceByType(@Param("adviceType") String adviceType); // 新增：按类型删除

    void deleteAdviceByUserAndType(@Param("userId") Integer userId,
                               @Param("adviceType") String adviceType);
}
